package main.java.game.item.equipableTreasure;

import main.java.game.combatant.Hero;
import main.java.game.item.Shield;
import main.java.game.item.ShieldType;

public class ShieldTreasure extends EquipableTreasure {

	private Shield shield;
	public ShieldTreasure (String name, Integer defenseValue, Integer attackValue, Integer initValue, Integer lpValue, Integer sellingPrice, Integer level, ShieldType type){
		super(name,defenseValue,attackValue,initValue,lpValue, sellingPrice, level);
		shield=new Shield(name, defenseValue, initValue, null, type);
		
	}
	public void equip(Hero hero) {
		shield.equip(hero);
		hero.getPlayer().getUsedTreasures().add(this);
		hero.getPlayer().getTreasures().remove(this);
		
	}

	
	public void unequip(Hero hero) {
		shield.unequip(hero);
		hero.getPlayer().getTreasures().add(this);
		hero.getPlayer().getUsedTreasures().remove(this);
		
	}

}
